<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="ItemContratoCreateDlg" widgetVar="ItemContratoCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateItemContratoTitle}">
            <h:form id="ItemContratoCreateForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{itemContratoController.selected != null}">
                        <p:outputLabel value="#{bundle.CreateItemContratoLabel_idItemContrato}" for="idItemContrato" />
                        <p:inputText id="idItemContrato" value="#{itemContratoController.selected.idItemContrato}" title="#{bundle.CreateItemContratoTitle_idItemContrato}" required="true" requiredMessage="#{bundle.CreateItemContratoRequiredMessage_idItemContrato}"/>
                        <p:outputLabel value="#{bundle.CreateItemContratoLabel_txDescricao}" for="txDescricao" />
                        <p:inputText id="txDescricao" value="#{itemContratoController.selected.txDescricao}" title="#{bundle.CreateItemContratoTitle_txDescricao}" required="true" requiredMessage="#{bundle.CreateItemContratoRequiredMessage_txDescricao}"/>
                        <p:outputLabel value="#{bundle.CreateItemContratoLabel_qtContratada}" for="qtContratada" />
                        <p:inputText id="qtContratada" value="#{itemContratoController.selected.qtContratada}" title="#{bundle.CreateItemContratoTitle_qtContratada}" required="true" requiredMessage="#{bundle.CreateItemContratoRequiredMessage_qtContratada}"/>
                        <p:outputLabel value="#{bundle.CreateItemContratoLabel_tpUnidadeContratada}" for="tpUnidadeContratada" />
                        <p:inputText id="tpUnidadeContratada" value="#{itemContratoController.selected.tpUnidadeContratada}" title="#{bundle.CreateItemContratoTitle_tpUnidadeContratada}" required="true" requiredMessage="#{bundle.CreateItemContratoRequiredMessage_tpUnidadeContratada}"/>
                        <p:outputLabel value="#{bundle.CreateItemContratoLabel_vlPrecoUnitario}" for="vlPrecoUnitario" />
                        <p:inputText id="vlPrecoUnitario" value="#{itemContratoController.selected.vlPrecoUnitario}" title="#{bundle.CreateItemContratoTitle_vlPrecoUnitario}" required="true" requiredMessage="#{bundle.CreateItemContratoRequiredMessage_vlPrecoUnitario}"/>
                        <p:outputLabel value="#{bundle.CreateItemContratoLabel_vlPrecoTotal}" for="vlPrecoTotal" />
                        <p:inputText id="vlPrecoTotal" value="#{itemContratoController.selected.vlPrecoTotal}" title="#{bundle.CreateItemContratoTitle_vlPrecoTotal}" required="true" requiredMessage="#{bundle.CreateItemContratoRequiredMessage_vlPrecoTotal}"/>
                        <p:outputLabel value="#{bundle.CreateItemContratoLabel_txApresentacao}" for="txApresentacao" />
                        <p:inputText id="txApresentacao" value="#{itemContratoController.selected.txApresentacao}" title="#{bundle.CreateItemContratoTitle_txApresentacao}" />
                        <p:outputLabel value="#{bundle.CreateItemContratoLabel_qtMaxContratada}" for="qtMaxContratada" />
                        <p:inputText id="qtMaxContratada" value="#{itemContratoController.selected.qtMaxContratada}" title="#{bundle.CreateItemContratoTitle_qtMaxContratada}" required="true" requiredMessage="#{bundle.CreateItemContratoRequiredMessage_qtMaxContratada}"/>
                        <p:outputLabel value="#{bundle.CreateItemContratoLabel_codObjetoContrato}" for="codObjetoContrato" />
                        <p:selectOneMenu id="codObjetoContrato" value="#{itemContratoController.selected.codObjetoContrato}" required="true" requiredMessage="#{bundle.EditItemContratoRequiredMessage_codObjetoContrato}">
                            <f:selectItems value="#{objetoContratoController.itemsAvailableSelectOne}"
                                           var="codObjetoContratoItem"
                                           itemValue="#{codObjetoContratoItem}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{itemContratoController.create}" value="#{bundle.Save}" update="display,:ItemContratoListForm:datalist,:growl" oncomplete="handleSubmit(args,'ItemContratoCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="ItemContratoCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
